@layout("/common/_container.html"){
<style>
    .ui-state-default {
        height: 40px;
        background: #fff;
        border: 1px solid aliceblue;
        line-height: 40px;
        border-radius: 3px;
        margin-bottom: 2px;
        width: 50%;
    }

    .ui-state-default:hover {
        cursor: pointer;
    }

    .title {
        background: #000;
        color: #fff;
    }

    .sortLeft {
        padding-right: 20px;
    }

    .sortRight {
        padding-right: 20px;
    }

    .ui-sortable {
        /*float: right;*/
    }

    .right_box {
        width: 330px;
        height: 400px;
        position: absolute;
        top: 57px;
        left: 590px;
        border: 1px solid #1E84C6;
    }
</style>
<div class="ibox float-e-margins">
    <div class="ibox-content">
        <div class="form-horizontal" id="isRevisitInfoForm">
            <div style="display: none">
                <input type="hidden" id="reservationsId" value="${reservationsInfo.id}"/>
                <input type="hidden" id="isReturnVisit"/>
            </div>
            <div class="row">
                <label class="control-label"> 咨询内容</label>
                <div><textarea id="content" name="content" rows=5 cols=150>${reservationsInfo.content}</textarea></div>
            </div>
            <div class="row">
                <label class="control-label"> 医生点评</label>
                <div><textarea id="jiedaiContent" name="jiedaiContent" rows=5 cols=150>${reservationsInfo.jiedaiContent}</textarea></div>
            </div>
            <div class="row">
                <label class="control-label"> 消费明细</label>
                <div><textarea id="xiaofeiContent" name="xiaofeiContent" rows=5 cols=150>${reservationsInfo.xiaofeiContent}</textarea></div>
            </div>
            <div class="row">
                <label class="control-label"> 备注</label>
                <div><textarea id="remarks" name="remarks" rows=5 cols=150>${reservationsInfo.remarks}</textarea></div>
            </div>
            <div class="row">
                <label class="control-label"> 回访详情</label>
                <div><textarea id="huifang" name="huifang" rows=5 cols=150>${reservationsInfo.huifang}</textarea></div>
            </div>
            <div class="row">
                添加回访详情：
                <div><textarea id="revisitContent" name="revisitContent" rows=5 cols=150></textarea>
                </div>
            </div>
            <div class="row">
                <input type="radio" name="radio" id="revisit" checked="checked" value="回访"/>回访
                <input type="radio" name="radio" id="noRevisit" value="不回访"/>不回访
            </div>
            <div id="url2" class="row">
                不回访原因：
                <div><textarea id="causeOfNoReturnVisit" name="causeOfNoReturnVisit" rows=5 cols=150></textarea>
                </div>
            </div>
            <div id="url1" class="row">
                <div class="col-sm-6">
                    <#input id="reservations" name="预约回访人" value="${reservations}"/>
                    <#input id="appointmentTime" name="预约回访时间" type="datetime"
                            clickFun="laydate({istime: true, format: 'YYYY-MM-DD hh:mm:ss'})"/>
                    预约回访备注：
                </div>
                <div><textarea id="remarksOfReturnVisit" name="remarksOfReturnVisit" rows=8 cols=150></textarea>
                </div>
            </div>
            <div class="row btn-group-m-t">
                <div class="col-sm-10">
                    <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="IsRevisitInfoDlg.addIsRevisitsd()"/>
                    <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="IsRevisitInfoDlg.close()"/>
                </div>
            </div>
        </div>
    </div>
</div>
<script src="${ctxPath}/static/modular/tcCenter/consultant/is_revisit_info.js"></script>
<script>
    $("ul#sortRevisit").on("click", "li", function () {      //只需要找到你点击的是哪个ul里面的就行
        $.ajax({
            url: Feng.ctxPath + "/consultant/getRevisitContent",
            type: "post",
            data: {
                "revisitTime": $(this).text(),
                "reservationsId": $("#reservationsId").val()
            },
            success: function (data) {
                $('#revisitContentDiv').html('<textarea id="revisitContents" name="revisitContents" rows=5 cols=70>' + data.revisitContent + '</textarea>');
                $('#revisitInformation').html('<div>  ' +
                    ' 姓名：  ${reservationsInfo.customerName}  &nbsp 性别：  ${reservationsInfo.sex} ' +
                    ' &nbsp 年龄： ${reservationsInfo.customerAge}&nbsp 电话： ${reservationsInfo.customerPhone} </div>');
                $('#revisitInformation2').html('<div> 回访人：' + data.revisit + '</div>');
            },
            error: function (data) {
                alert('内部故障!');
            }
        });
    });
    //点击时间框样式变化
    var dom = document.getElementById("sortRevisit");
    var domchilds = document.getElementsByClassName("ui-state-default");
    dom.onclick = function (e) {
        var ev = e.event || window.event;
        for (var i = 0; i < domchilds.length; i++) {
            domchilds[i].style.borderColor = '#d3d3d3';
        }
        ev.target.style.borderColor = 'red';
    }
</script>
@}
